from utils import ARTIST_PICTURES_URL

class DeezerArtist:
  @staticmethod
  def from_raw_data(raw_data):
    artist_data = raw_data["results"]["DATA"]
    return DeezerArtist(
      artist_id = artist_data["ART_ID"],
      name = artist_data["ART_NAME"],
      picture_url = ARTIST_PICTURES_URL % artist_data["ART_PICTURE"]
    )

  def __init__(
    self,
    artist_id = None,
    name = None,
    picture_url = None
  ):
    self.artist_id = artist_id
    self.name = name
    self.picture_url = picture_url
